﻿namespace CatClient.Context
{
    using CatClient;
    using CatClient.Message.Spi.Internals;
    using System;

    public class CatKeyContext : IDisposable
    {
        private readonly DefaultMessageManager.CurrentKey _key = Cat.GetCurrent();

        public void Dispose()
        {
            Cat.SetCurrent(this._key);
        }
    }
}

